border: 1px solid $selected_bg_color;
}
+// Pointer location
+.ripple-pointer-location {
+ width: 50px;
+ height: 50px;
+ border-radius: 25px 25px 25px 25px; // radius the size of the box give us the curve
+ background-color: lighten(transparentize($selected_bg_color, 0.7), 30%);
+ box-shadow: 0 0 2px 2px lighten($selected_bg_color, 20%);
+}
+
// not really top bar only
.popup-menu-arrow { icon-size: 1.09em; }
.popup-menu-icon { icon-size: 1.09em; }
<file>ui/keyboard.js</file>
<file>ui/layout.js</file>
<file>ui/lightbox.js</file>
+ <file>ui/locatePointer.js</file>
<file>ui/lookingGlass.js</file>
<file>ui/magnifier.js</file>
<file>ui/magnifierDBus.js</file>
--- /dev/null
+// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
+
+const { Clutter, Gio, GLib, St } = imports.gi;
+const Ripples = imports.ui.ripples;
+const Main = imports.ui.main;
+
+const LOCATE_POINTER_KEY = "locate-pointer";
+const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface"
+
+var locatePointer = class {
+ constructor() {
+ this._settings = new Gio.Settings({schema_id: LOCATE_POINTER_SCHEMA});
+ this._ripples = new Ripples.Ripples(0.5, 0.5, 'ripple-pointer-location');
+ this._ripples.addTo(Main.uiGroup);
+ }
+
+ show() {
+ if (!this._settings.get_boolean("locate-pointer"))
+ return;
+
+ let [x, y, mods] = global.get_pointer();
+ this._ripples.playAnimation(x, y);
+ }
+};
const Magnifier = imports.ui.magnifier;
const XdndHandler = imports.ui.xdndHandler;
const KbdA11yDialog = imports.ui.kbdA11yDialog;
+const LocatePointer = imports.ui.locatePointer;
const A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard';
const STICKY_KEYS_ENABLE = 'stickykeys-enable';
var kbdA11yDialog = null;
var inputMethod = null;
var introspectService = null;
+var locatePointer = null;
let _startDate;
let _defaultCssStylesheet = null;
let _cssStylesheet = null;
wm.allowKeybinding('overlay-key', Shell.ActionMode.NORMAL |
Shell.ActionMode.OVERVIEW);
+ wm.allowKeybinding('locate-pointer-key', Shell.ActionMode.ALL);
+
wm.setCustomKeybindingHandler('panel-run-dialog',
Shell.ActionMode.NORMAL |
Shell.ActionMode.OVERVIEW,
kbdA11yDialog = new KbdA11yDialog.KbdA11yDialog();
wm = new WindowManager.WindowManager();
magnifier = new Magnifier.Magnifier();
+ locatePointer = new LocatePointer.locatePointer();
+
if (LoginManager.canLock())
screenShield = new ScreenShield.ScreenShield();
overview.toggle();
});
+ global.connect('locate-pointer', () => {
+ locatePointer.show();
+ });
+
global.display.connect('show-restart-message', (display, message) => {
showRestartMessage(message);
return true;
return _shell_wm_create_inhibit_shortcuts_dialog (get_shell_wm (), window);
}
+static void
+gnome_shell_plugin_locate_pointer (MetaPlugin *plugin)
+{
+ GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
+ _shell_global_locate_pointer (shell_plugin->global);
+}
+
static void
gnome_shell_plugin_class_init (GnomeShellPluginClass *klass)
{
plugin_class->create_close_dialog = gnome_shell_plugin_create_close_dialog;
plugin_class->create_inhibit_shortcuts_dialog = gnome_shell_plugin_create_inhibit_shortcuts_dialog;
+
+ plugin_class->locate_pointer = gnome_shell_plugin_locate_pointer;
}
static void
gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
XEvent *xev);
+void _shell_global_locate_pointer (ShellGlobal *global);
+
#endif /* __SHELL_GLOBAL_PRIVATE_H__ */
enum
{
NOTIFY_ERROR,
+ LOCATE_POINTER,
LAST_SIGNAL
};
G_TYPE_NONE, 2,
G_TYPE_STRING,
G_TYPE_STRING);
+ shell_global_signals[LOCATE_POINTER] =
+ g_signal_new ("locate-pointer",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
g_object_class_install_property (gobject_class,
PROP_SESSION_MODE,
{
return load_variant (global->userdatadir_path, property_type, property_name);
}
+
+void
+_shell_global_locate_pointer (ShellGlobal *global)
+{
+ g_signal_emit (global, shell_global_signals[LOCATE_POINTER], 0);
+}